<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='global-property-'>/**
</span> * checkable menu item render
 * @ignore
 * @author yiminghe@gmail.com
 */
KISSY.add('menu/check-menuitem-render', function (S, MenuItemRender, ContentRenderExtension, CheckMenuItemTpl) {
    return MenuItemRender.extend([ContentRenderExtension], {
        beforeCreateDom: function (renderData) {
            if (renderData.checked) {
                renderData.elCls.push(self.getBaseCssClasses(&quot;checked&quot;));
            }
        },

        _onSetChecked: function (v) {
            var self = this,
                cls = self.getBaseCssClasses(&quot;checked&quot;);
            self.$el[v ? 'addClass' : 'removeClass'](cls);
        }
    }, {
        ATTRS: {
            contentTpl: {
                value: CheckMenuItemTpl
            }
        }
    })
}, {
    requires: [
        './menuitem-render',
        'component/extension/content-render',
        './check-menuitem-xtpl'
    ]
});</pre>
</body>
</html>
